var $ = getApp(), methods = require("../methods.js");
Page(Object.assign({}, methods, {
	data: {
		datalist: [],
		pagenum: 1,
		randt:'1',
	},
	_onLoad:function(){
		this.setData({needAuth: $.needAuth,aid:$.aid,session_id:$.config.session_id});
		var that = this
	},
	subform: function (e){
		var that = this
		var formdata = e.detail.value
		$.post("businessht/login",formdata,function(res){
			if(res.status==1){
				$.success(res.msg);
				setTimeout(function(){
					$.goto('index','redirect');
				},1000)
			}else{
				$.error(res.msg);
				that.regetcaptcha();
			}
		});
	},
	regetcaptcha:function(){
		this.setData({randt:this.data.randt+'1'})
	}
}))